File
----
1B compression type (LZ type)
4B decompressed size
XB compressed data

Compressed data format
1B FLAG
XB DATA

FLAG     DATA size     Explanation
  0x00      0B          Mark of end of compressed data (stop processing)
 <0x7E    (FLAG)B       Raw data, copy 'FLAG value' bytes data to output
  0x7E      2B          RLE, 1B RLE length-4, 1B value (copy length+4 bytes of given value to output)
  0x7F      3B          RLE, 2B RLE length  , 1B value (copy length bytes of given value to output)
>=0x80      1B          LZ,  data 1B offset, lzflag = FLAG - 0x80

LZ type 1
LZflag   = FLAG - 0x80
LZoffset = DATA + ( LZflag & 0x7)*0x100
LZbytes  = 3    + ((LZflag>>3) & 0xF)
LZflag   = 0BBBBFFF (BBBB - value for bytes, FFF - value for offset,)
CURRENT_POSITION = current position while decoding/decompressing file 
                   ( = count of decoded bytes = position to where write next byte)
Values from CURRENT_POSITION - (LZoffset+1) to CURRENT_POSITION - (LZoffset+LZbytes) to output


LZ type 2
LZoffset = DATA + ( LZflag & 0xF)*0x100
LZbytes  = 3    + ((LZflag>>4) & 0x7)
LZflag   = 0BBBFFFF (BBB - value for bytes, FFFF - value for offset)

--------------------------------------------------------

OFFSET  SIZE
0x0      1B   compression type
0x1      4B   decompressed size
0x5      XB   compressed data
